home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-18 | 4.2 KB | 69 lines | [TEXT/MPS ] |
- This document assumes that you have read or are familiar with the contents of the
- document “AppWannabe.Tutorial”. This document addresses the needs of an application
- that has only a single document type.
-
- A single document type is the most straightforward usage of AppWannabe. AppWannabe
- has all of the DTS framework callback functions already implemented. Many of the
- functions are simply stub functions and have no code body. All you need to do is to
- add code to these functions.
-
- The functions in AppWannabe that are called by the application framework are commented
- as such. All you need to do to find all of these functions is to do a find on •• for
- the source code files in AppWannabe.
-
- You can also look at the file DTS.protos.h to see which functions are expected by the
- application framework. Again, the functions that the framework calls are marked by ••.
-
- All you need to do to work harmoniously with the framework is to place the appropriate
- code for your application within these functions. Of course, you can do whatever else
- you would like to the AppWannabe application shell, as it is simply the beginning of your
- application. Just remember to verify that you are doing enough for the framework to
- get your application task done. Remember that the completely empty AppWannabe is already
- compatible with the framework. It has all of the necessary functions. It is simply that
- many of these functions don't do anything (since AppWannabe doesn't do anything).
-
-
- One immediate choice you will have to make is what to do with the window content. The
- framework separates the window content into two pieces, namely the frame content and
- the non-frame content. The frame content consists of the document scrollbars (if any),
- the grow icon (if you have one), top and left sidebars (if any), and an extra irregular
- frame area (if you have one). Everything else is considered non-frame (regular) content.
-
- One notable difference is that the frame portion of the window doesn't get imaged when
- you print. This is quite reasonable, as document scrollbars and a grow icon would be
- a silly thing to print. The non-frame portion of the window is the part that prints,
- so any portion of the window you want to print will have to be placed in the non-frame
- part of the content.
-
- The function that prints the non-frame content is ImageDocument. The port for drawing
- is already set when this function is called. The port will either be the window port or
- the printer port. The global variable gPrintPage is used to determine which case.
-
- The function DrawFrame is called to draw the application-portion of the frame. The
- framework draws the document scrollbars and grow icon, if you have such. Any additional
- parts you have in the frame are your responsibility to draw.
-
- If you have additional parts you think belong in the frame content, please understand
- the various alternatives available to you. These are:
-
- 1) Sidebars. How to do a crude ruler is demonstrated in “AppWannabe.Tutorial”.
- 2) The application frame region. CalcFrameRgn is responsible for returning the region
- that encompasses the frame area that isn't already included in the document scrollbar,
- grow icon, and sidebar areas. If you can get your job done in the sidebar areas,
- you don't need this facility. This facility is for those cases where the “frame”
- area is irregular.
- 3) None of the above. If you have a very simple window content, then it is possible that
- you don't need either of the above facilities. If your content doesn't scroll, then it
- can most likely all be handled in the content. Remember, even if you print differently
- than you draw, you can always image conditionally, depending on gPrintPage.
- The big advantage of the frame region is that you don't have to worry about clipping
- these immobile areas of the window content. The framework clips them out for you,
- without using the clip region. (This leaves the clip region all for you.)
- The content is scrolled without affecting the frame area. This is why it is good to
- use for things like rulers and such. Of course if you document doesn't scroll, then
- you don't have to worry about clipping these areas.
-
-
- For further information, please refer to the document “AppWannabe.Tutorial”.
-
-